//
// Created by 王乐 on 2022/2/18.
//

#ifndef LESTE_LEPOSTPROCESSINGBLOOMRENDERER_H
#define LESTE_LEPOSTPROCESSINGBLOOMRENDERER_H

#include "LeRenderer.h"

class LePostProcessingBloomRenderer : public LeRenderer
{
public:
    LePostProcessingBloomRenderer();

    virtual ~LePostProcessingBloomRenderer();

public:

    void preLoopRender() override;

    void postprocessingSetup() override;

    void render() override;

    void postprocessingRender() override;

    void postLoopRender() override;

private:
    void renderQuad();

private:
    unsigned int hdrFBO;
    unsigned int colorBuffers[2];
    unsigned int rboDepth;

    LeShader shaderBlur;
    unsigned int pingpongFBO[2];
    unsigned int pingpongColorbuffers[2];

    unsigned int amount;
};


#endif //LESTE_LEPOSTPROCESSINGBLOOMRENDERER_H
